# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         demo06
# Description:
# Author:       98745
# Date:         2019/3/9
#-------------------------------------------------------------------------------

s1=set(range(10))
print(type(s1))
print(s1)
s2=set('hello')
print(s2)
s3=set(['pan','yan','zhen','pan'])
print(s3)
a=set((1,2,3))
b=set([3,5,1,7])
print(a.union(b))
print(a|b)
print(a.intersection(b))
print(a&b)
c=set([2,3])
print(c.issubset(a))
print(a.issubset(c))
print(a.issuperset(c))
print(c.issuperset(a))
d=set([1,2,3])
print(a==d)
print(a.difference(b))
print(a-b)
print(a.symmetric_difference(b))
print(a^b)
print((a-b)|(b-a))
x=a.copy()
print(x is a)
x.add(30)
print(x)
print(a)
print(d)
print(1 in d)
print(10 in d)